﻿package blob.levelstates
{
    import blob.*;
    import org.flixel.*;

    public class LevelState1 extends PlayState
    {
        private var ImgTiles:Class;
        private var Bg:Class;
        private var DataMap:Class;

        public function LevelState1()
        {
            this.ImgTiles = LevelState1_ImgTiles;
            this.Bg = LevelState1_Bg;
            this.DataMap = LevelState1_DataMap;
            return;
        }// end function

        override public function create() : void
        {
            super.create();
            QID = 1;
            var _loc_1:* = new FlxSprite(0, 0, this.Bg);
            add(_loc_1);
            levelName.text = Blob.level1Name;
            var _loc_2:* = new FlxText(50, 300, 300, "LEFT-ARROW to move left,\nRIGHT-ARROW to move right");
            var _loc_3:* = new FlxText(400, 300, 250, "UP-ARROW to jump");
            _loc_2.setFormat(null, 16);
            _loc_3.setFormat(null, 16);
            add(_loc_2);
            add(_loc_3);
            _map1 = new FlxTilemap();
            mechanisms = new FlxGroup(30);
            activeChar = 0;
            curChars = new Array();
            loadMap(new this.DataMap(), _map1, this.ImgTiles, 10, 10);
            finishCharSize = 1;
            thisLevelClass = LevelState1;
            nextLevelClass = LevelState2;
            twoStarTime = 10;
            threeStarTime = 5;
            pause = new PauseMenu();
            return;
        }// end function

    }
}
